package org.nvframe.event.eventtype;

import org.nvframe.event.AbstractEvent;
import org.nvframe.event.Event;
import org.nvframe.event.EventListener;

public class EventFiredEvent extends AbstractEvent {

	private static Class<? extends EventListener> listener = EventFiredListener.class;
	
	private Event event;

	public EventFiredEvent(Event event) {
		this.event = event;
	}
	
	public void dispatchToListener(EventListener listener) {
		((EventFiredListener) listener).onEvent(this);
	}

	public Event getFiredEvent() {
		return event;
	}

	@Override
	protected Class<? extends EventListener> getListener() {
		return listener;
	}
	
}